package com.book.dao;

import com.book.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from user where username=#{username} and password=#{password}")
    User selectUser(@Param("username")String username,@Param("password")String password);

    @Insert("insert into user(username,nickname,password) values(#{username},#{nickname},#{password})")
    int addUser(@Param("username")String username,@Param("nickname")String nickname,@Param("password")String password);
}
